From: Sebastian Keller Date: Sun, 20 Feb 2022 15:53:43 +0000 (+0100) Subject: workspacesView: Disable workspace switching while in search X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~61 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=23047b6d80f06dbc099c1135eb8270cd5443d4e4;p=gnome-shell.git workspacesView: Disable workspace switching while in search WorkspacesDisplay connects to key-press-event on the stage to switch workspaces when page up or down is pressed and nothing else intercepts these keys. This means that it is still possible to switch workspaces while they are hidden behind the search. So only allow these keybinding while the WorkspacesDisplay is reactive which gets updated by ControlsManager depending on whether there is an active search or not. Also set it as initially reactive, because otherwise the keybindings would only work after performing an initial search. Part-of: --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 6dad2df3f..0acc3e562 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -833,6 +833,7 @@ class WorkspacesDisplay extends St.Widget { _init(controls, scrollAdjustment, overviewAdjustment) { super._init({ layout_manager: new Clutter.BinLayout(), + reactive: true, }); this._controls = controls; @@ -1150,6 +1151,9 @@ class WorkspacesDisplay extends St.Widget { if (this._overviewAdjustment.value !== ControlsState.WINDOW_PICKER) return Clutter.EVENT_PROPAGATE; + if (!this.reactive) + return Clutter.EVENT_PROPAGATE; + const { workspaceManager } = global; const vertical = workspaceManager.layout_rows === -1; const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;